package br.com.seuimovelnamao.hibernate;

import org.hibernate.cfg.AnnotationConfiguration;
import org.hibernate.tool.hbm2ddl.SchemaExport;

import br.com.seuimovelnamao.dao.PlanoDAO;
import br.com.seuimovelnamao.model.Bairro;
import br.com.seuimovelnamao.model.Cidade;
import br.com.seuimovelnamao.model.ContratacaoPlano;
import br.com.seuimovelnamao.model.Endereco;
import br.com.seuimovelnamao.model.Estado;
import br.com.seuimovelnamao.model.Imovel;
import br.com.seuimovelnamao.model.Plano;
import br.com.seuimovelnamao.model.Usuario;

public class GeraTabelas {

	public static void main(String[] args) {
		
		AnnotationConfiguration cfg = new AnnotationConfiguration();
		cfg.addAnnotatedClass(Usuario.class);
		cfg.addAnnotatedClass(Imovel.class);
		cfg.addAnnotatedClass(Plano.class);
		cfg.addAnnotatedClass(ContratacaoPlano.class);
		cfg.addAnnotatedClass(Endereco.class);
		cfg.addAnnotatedClass(Bairro.class);
		cfg.addAnnotatedClass(Cidade.class);
		cfg.addAnnotatedClass(Estado.class);
		SchemaExport se = new SchemaExport(cfg);
		se.create(true, true);
		
	}
	
}
